package com.yumeko.springcloud.controller;

import com.yumeko.springcloud.entity.TPayment;
import com.yumeko.springcloud.server.PaymentFeignClientServer;
import com.yumeko.springcloud.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: SpringCloud
 * @description:
 * @author: Zheng Hao
 * @create: 2020-03-08 23:48
 */
@RestController
public class PaymentFeignController {
    @Resource
    private PaymentFeignClientServer paymentFeignClientServer;

    @GetMapping(value = "/consumer/tPayment/selectOne1/{id}")
    public ResponseData queryById1(@PathVariable("id") Long id){
        return paymentFeignClientServer.selectOnePayment1(id);
    }

    @GetMapping(value = "/consumer/tPayment/selectOne")
    public ResponseData queryById(Long id){
        return paymentFeignClientServer.selectOnePayment(id);
    }

    @GetMapping(value = "/consumer/tPayment/payment/feign/timeout")
    public String paymentFeignTimeOut(){
        return paymentFeignClientServer.paymentFeignTimeOut();
    }
}
